package com.heatup.apt.common.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.heatup.apt.model.channer.ChannerQrcode;

@Component
public interface ChannerQrcodeMapper {
	
	ChannerQrcode queryChannerQrcodeById  (int id);
	
	int insertChannerQrcode(ChannerQrcode channerQrcode);
	
	int updateChannerQrcode(ChannerQrcode channerQrcode);
	
	List<ChannerQrcode> queryChannerQrcodeList(Map<String, Object> map);
	
	/**
	 * 通过 ticket 获取渠道
	 * @param ticket
	 * @return
	 */
	ChannerQrcode queryChannerQrcodeByTicket  (String  ticket);
	
	/**
	 * 通过渠道Id和换取二维码的ticket
	 * @param channerId
	 * @param ticket
	 * @return
	 */
	ChannerQrcode queryChannerQrcodeByIdAndTicket  (@Param("channerId") Integer channerId,@Param("ticket")String  ticket);
}
